<form name="widgetEditForm" novalidate role="form" ng-submit="saveDialog()">
  <div class="modal-header">
    <button type="button" class="close" ng-click="closeDialog()"><span aria-hidden="true">&times;</span><span class="sr-only">close</span></button>
    <h4 class="modal-title">{{widget.title}}</h4>
  </div>
  <div class="modal-body">
    <div class="alert alert-danger" role="alert" ng-show="validationError">
      <strong>Apply error:</strong> {{validationError}}
    </div>
    <div class="form-group">
      <label for="widgetTitle" ng-bind="translate('ADF_COMMON_TITLE')">Title</label>
      <input type="text" class="form-control" id="widgetTitle" ng-model="definition.title" placeholder="Enter title" required="">
    </div>
    <div ng-if="widget.edit">
      <adf-widget-content adf-model="adfModel" model="definition" content="widget.edit" />
    </div>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-default" ng-click="closeDialog()" ng-bind="translate('ADF_COMMON_CANCEL')">Cancel</button>
    <input type="submit" class="btn btn-primary" ng-disabled="widgetEditForm.$invalid" ng-value="translate('ADF_COMMON_APPLY')" />
  </div>
</form>
